package com.justin.day1227.main;

class Person {
    private String name;
    private int age;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return this.age;
    }


    public void tell() {
        System.out.println("姓名:" + this.getName() + ", 性别:" + this.getAge());
    }
}

class People {
    private String name;
    private int age;
    public People(int age, String name) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return this.name;
    }

    public int getAge() {
        return this.age;
    }

    public void tell() {
        System.out.println("姓名:" + this.getName() + ", 性别:" + this.getAge());
    }
}

public class Main {

    public static void main(String[] args) {
        System.out.println(say());
        // 方法重载, 方法名相同, 参数类型和个数不同
//        tell(1, "2");
//        tell(3);
//        Person person = new Person();
//        person.setName("张三");
//        person.tell();
        People people = new People(150, "张三");
        people.tell();
    }

    public static int say() {
        return 0;
    }

    public static void tell(int i, String n) {
        System.out.println("i:" + i + ", n:" + n);
    }

    public static void tell(int i) {
        System.out.println("i:" + i);
    }

}
